Skip to main content
Version: 2.x

Class NativeBindings.OdinTArray<T>

Pinned Buffer (for an unmanaged-compatible type T)

Declaration
public class NativeBindings.OdinTArray<T> : IDisposable where T : struct

Implements:
System.IDisposable

Methods

SetBuffer(T[])

Declaration
public void SetBuffer(T[] buffer)
Parameters
TypeName
<T>[]buffer

SetBuffer(nint, int)

Declaration
public void SetBuffer(nint bufferPtr, int length)
Parameters
TypeName
System.IntPtrbufferPtr
System.Int32length

GetBuffer()

Declaration
public Span<T> GetBuffer()
Returns

System.Span<<T>>

GetBuffer(int)

Declaration
public Span<T> GetBuffer(int index)
Returns

System.Span<<T>>

Parameters
TypeName
System.Int32index

GetBuffer(int, int)

Declaration
public Span<T> GetBuffer(int index, int length)
Returns

System.Span<<T>>

Parameters
TypeName
System.Int32index
System.Int32length

FlushBuffer()

Copies the managed buffer back to the native pointer.

Declaration
public void FlushBuffer()

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public void Dispose()

Implements

  • System.IDisposable